<?php

namespace app\modules\goodsdetail\controllers;

use yii\web\Controller;
use common\models\Tools;
use common\models\Goods;

/**
 * Default controller for the `goodsdetail` module
 */
class DaozhaController extends Controller
{
    /**
     * Renders the index view for the module
     * @return string
     */
    public function actionIndex()
    {
        $seller_id = Tools::GetSafeParam('id', 0, 0);
        
        $data = Goods::getDaozhaGoods($seller_id);
        
        $data['status_arr'] = array(0=>'待审核',1=>'正出售',2=>'已下架',3=>'未通过',4=>'已删除');
        echo "<pre>"; print_r($data);exit;
		$this->getView()->title = $data['name'];
        return $this->render('index',['data'=>$data]);
    }
}
